package com.hr.followers.service.impl;

import java.util.List;

import com.hr.common.core.domain.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hr.followers.mapper.FollowersMapper;
import com.hr.followers.domain.Followers;
import com.hr.followers.service.IFollowersService;

/**
 * 关注者Service业务层处理
 * 
 * @author guan
 * @date 2024-08-01
 */
@Service
public class FollowersServiceImpl implements IFollowersService 
{
    @Autowired
    private FollowersMapper followersMapper;

    /**
     * 查询关注者
     * 
     * @param followUserid 关注者主键
     * @return 关注者
     */
    @Override
    public Followers selectFollowersByFollowUserid(Long followUserid)
    {
        return followersMapper.selectFollowersByFollowUserid(followUserid);
    }

    /**
     * 查询关注者列表
     * 
     * @param followers 关注者
     * @return 关注者
     */
    @Override
    public List<SysUser> selectFollowersList(SysUser user)
    {
        return followersMapper.selectFollowersList(user);
    }

    /**
     * 新增关注者
     * 
     * @param followers 关注者
     * @return 结果
     */
    @Override
    public int insertFollowers(Long id)
    {
        return followersMapper.insertFollowers(id);
    }

    /**
     * 修改关注者
     * 
     * @param followers 关注者
     * @return 结果
     */
    @Override
    public int updateFollowers(Followers followers)
    {
        return followersMapper.updateFollowers(followers);
    }

    /**
     * 批量删除关注者
     * 
     * @param followUserids 需要删除的关注者主键
     * @return 结果
     */
    @Override
    public int deleteFollowersByFollowUserids(Long[] followUserids)
    {
        return followersMapper.deleteFollowersByFollowUserids(followUserids);
    }

    /**
     * 删除关注者信息
     * 
     * @param followUserid 关注者主键
     * @return 结果
     */
    @Override
    public int deleteFollowersByFollowUserid(Long followUserid)
    {
        return followersMapper.deleteFollowersByFollowUserid(followUserid);
    }
}
